Storage medium, information processing apparatus, information processing method and information processing system

ABSTRACT

A computer-readable storage medium having stored therein an information processing program to be executed by a computer is provided. The information processing program causes the computer to function as: preferential display object placing means for placing a preferential display object in an imaging range of a virtual stereo camera in a virtual three-dimensional space; stereoscopically visible image rendering means for taking the virtual three-dimensional space using the virtual stereo camera, and rendering a stereoscopically visible image of the virtual three-dimensional space; and display control means for causing the display apparatus to display the stereoscopically visible image rendered by the stereoscopically visible image rendering means. The stereoscopically visible image rendering means renders the preferential display object in preference to a predetermined object in front of the preferential display object, such that a portion of the preferential display object being overlapped by the predetermined object is translucent.

CROSS REFERENCE TO RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2011-089233 filed onApr. 13, 2011 is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a storage medium, an informationprocessing apparatus, an information processing method and aninformation processing system, and more particularly, to those forrealizing stereoscopically visible image display.

2. Description of the Background Art

Conventionally, there has been proposed a shooting game progressed in avirtual three-dimensional space, in which a shooting aim to be an indexfor attacking (shooting) an enemy plane is displayed on a display screen(refer to Japanese Laid-Open Patent Publication No. 10-295935, forexample). This shooting aim is rendered on a two-dimensional plane inwhich the virtual three-dimensional space is rendered, and is moved up,down, and side to side according to a user input while it is constantlydisplayed on the display screen,

When performing stereoscopically visible image display using theabove-described conventional technique, an aim object is rendered in thetwo-dimensional plane in which the virtual three-dimensional space isrendered. Therefore, the aim object is visually recognized by a user asif it is present in front of all other objects, resulting in anextremely unnatural stereoscopically visible image.

In order to avoid this problem, the virtual three-dimensional space maybe rendered (imaged) with the aim object being placed in the virtualthree-dimensional space as well as the other objects. In this case, theaim object is visually recognized to be present forward (in a depthdirection), resulting in a natural stereoscopically visible image.However, if another object is present in front of the aim object, theaim object is hidden behind the other object, and thus the aim objectloses its function as a shooting aim.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to provide a recordingmedium or the like having stored therein an information processingprogram by which an indication object (typically, an aim object) forindicating a position in a virtual three-dimensional space can benaturally and stereoscopically displayed with a sense of depth, withoutlosing its indicating function, when the virtual three-dimensional spaceis stereoscopically displayed.

The present invention has the following features to attain the objectmentioned above.

A computer-readable storage medium is provided, which has stored thereinan information processing program to be executed by a computer of aninformation processing apparatus which displays a stereoscopicallyvisible image of a virtual three-dimensional space taken by a virtualstereo camera, on a display apparatus capable of displaying astereoscopically visible image. The information processing programfurther causes the computer to function as preferential display objectplacing means, stereoscopically visible image rendering means, anddisplay control means. The preferential display object placing meansplaces a preferential display object in an imaging range of the virtualstereo camera in the virtual three-dimensional space. Thestereoscopically visible image rendering means takes the virtualthree-dimensional space using the virtual stereo camera, and renders astereoscopically visible image of the virtual three-dimensional space.The display control means causes the display apparatus to display thestereoscopically visible image rendered by the stereoscopically visibleimage rendering means. The stereoscopically visible image renderingmeans renders the preferential display object in preference to an objectin front of the preferential display object, such that a portion of thepreferential display object being overlapped by the object in front istranslucent.

With this configuration, the preferential display object is rendered inpreference to the object in front of the preferential display objectsuch that a portion of the preferential object being overlapped by theobject in front is translucent. Thereby, the preferential display objectcan be displayed at a deeper position by a parallax and constantlydisplayed, and in addition, the preferential display object can beviewed in a natural manner.

The stereoscopically visible image rendering means renders thepreferential display object according to a preference order by which thepredetermined object in front of the preferential display object ispreferentially rendered, and renders the preferential display objectaccording to a preference order by which the preferential display objectis preferentially rendered translucent. Particularly, the preferentialdisplay object may include a first object and a second object which isidentical with the first object and translucent. The first object may berendered according to the preference order by which the predeterminedobject in front of the preferential object is preferentially rendered,and the second object may be rendered according to the preference orderby which the preferential display object is preferentially rendered. Thepreference order can be set by, for example, a method using a Z buffer.First, the preferential display object may be rendered using theordinary Z test, and then the preferential display object which istranslucent may be rendered in a situation where a result of a Z test isopposite to that of the ordinary Z test.

With this configuration, without determining whether at least a portionof the preferential object is overlapped by the predetermined object infront of the preferential display object, the portion of thepreferential object being overlapped by the predetermined object infront can be displayed translucent by the rendering process using theZ-buffer algorithm.

The information processing program may further cause the computer tofunction as input receiving means for receiving an input from a user,and the preferential display object placing means may cause thepreferential display object placed in the virtual three-dimensionalspace to move based on the input received by the input receiving means.

With this configuration, the user can operate the preferential displayobject to move.

The user object placing means may further cause the user object to movebased on the input received by the input receiving means.

With this configuration, the user can operate the user object to move.

The preferential display object may be an indication object forindicating a position in the virtual three-dimensional space.

With this configuration, the user can recognize a position including adepth position in the virtual three-dimensional space, which isindicated by the indication object.

In the above description, the present invention is configured as arecording medium. However, the present invention may be configured as aninformation processing apparatus, an information processing method, oran information processing system.

According to the present invention, it is possible to provide arecording medium and the like having stored therein an informationprocessing program by which an indication object (typically, an aimobject) indicating a position in a virtual three-dimensional space canbe naturally and stereoscopically displayed with a sense of depth,without losing its indicating function, when the virtualthree-dimensional space is stereoscopically displayed.

These and other objects, features, aspects and advantages of the presentinvention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a front view of a game apparatus 10 in the opened state;

FIG. 2 illustrates a left side view, a front view, a right side view,and a rear view of the game apparatus 10 in the closed state;

FIG. 3 is a block diagram illustrating an internal configuration of thegame apparatus 10;

FIG. 4 is a diagram illustrating an example of a virtualthree-dimensional space, and an image (a stereoscopically visible imageviewed by a user) that is obtained by taking the virtualthree-dimensional space with a virtual stereo camera;

FIG. 5 is a diagram illustrating an example of a virtualthree-dimensional space, and an image (a stereoscopically visible imageviewed by a user) that is obtained by taking the virtualthree-dimensional space with a virtual stereo camera;

FIG. 6 is a diagram illustrating an example of a virtualthree-dimensional space, and an image (a stereoscopically visible imageviewed by a user) that is obtained by taking the virtualthree-dimensional space with a virtual stereo camera;

FIG. 7 is a diagram illustrating a memory map of a main memory 32 of thegame apparatus 10;

FIG. 8 is a flowchart illustrating an example of game processing to beexecuted by the game apparatus 10;

FIG. 9 is a flowchart illustrating an example of a rendering process instep S2 in FIG. 8;

FIG. 10 is a diagram illustrating an example of a virtualthree-dimensional space; and

FIG. 11 is a diagram illustrating an example of a virtualthree-dimensional space, and an image (a stereoscopically visible imageviewed by a user) that is obtained by taking the virtualthree-dimensional space with a virtual stereo camera.

DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment

Hereinafter, a game apparatus as an information processing apparatusaccording to one embodiment of the present invention will be described.The present invention is not limited to such an apparatus. Aninformation processing program to be executed in such an apparatus andan information processing system relating to such an apparatus are alsowithin the scope of the present invention. Further, an informationprocessing method performed by such an apparatus is also within thescope of the present invention.

(External Configuration of Game Apparatus)

FIG. 1 and FIG. 2 are each a plan view of an outer appearance of a gameapparatus 10. The game apparatus 10 is a hand-held game apparatus, andis configured to be foldable as shown in FIG. 1 and FIG. 2. FIG. 1 showsthe game apparatus 10 in an opened state, and FIG. 2 shows the gameapparatus 10 in a closed state. FIG. 1 is a front view of the gameapparatus 10 in the opened state. The game apparatus 10 is able to takean image by means of an imaging section, display the taken image on ascreen, and store data of the taken image. The game apparatus 10 canexecute a game program which is stored in an exchangeable memory card ora game program which is received from a server or another gameapparatus, and can display, on the screen, an image generated bycomputer graphics processing, such as an image taken by a virtual cameraset in a virtual space, for example.

Initially, an external structure of the game apparatus 10 will bedescribed with reference to FIG. 1 and FIG. 2. The game apparatus 10includes a lower housing 11 and an upper housing 21 as shown in FIG. 1and FIG. 2. The lower housing 11 and the upper housing 21 are connectedto each other so as to be openable and closable (foldable).

(Description of Lower Housing)

Initially, a structure of the lower housing 11 will be described. Asshown in FIG. 1 and FIG. 2, in the lower housing 11, a lower LCD (LiquidCrystal Display) 12, a touch panel 13, operation buttons 14A to 14L, ananalog stick 15, an LED 16A and an LED 16B, an insertion opening 17, anda microphone hole 18 are provided. Hereinafter, these components will bedescribed in detail.

As shown in FIG. 1, the lower LCD 12 is accommodated in the lowerhousing 11. The number of pixels of the lower LCD 12 may be, forexample, 320 dots×240 dots (the horizontal line x the vertical line).The lower LCD 12 is a display device for displaying an image in a planarmanner (not in a stereoscopically visible manner), which is differentfrom the upper LCD 22 as described below. Although an LCD is used as adisplay device in the present embodiment, any other display device suchas a display device using an EL (Electro Luminescence), or the like maybe used. In addition, a display device having any resolution may be usedas the lower LCD 12.

As shown in FIG, 1, the game apparatus 10 includes the touch panel 13 asan input device. The touch panel 13 is mounted on the screen of thelower LCD 12. In the present embodiment, the touch panel 13 may be, butis not limited to, a resistive film type touch panel. A touch panel ofany type such as electrostatic capacitance type may be used. In thepresent embodiment, the touch panel 13 has the same resolution(detection accuracy) as that of the lower LCD 12. However, theresolution of the touch panel 13 and the resolution of the lower LCD 12may not necessarily be the same. Further, the insertion opening 17(indicated by dashed line in FIG. 1 and FIG. 2( d)) is provided on theupper side surface of the lower housing 11. The insertion opening 17 isused for accommodating a touch pen 28 which is used for performing anoperation on the touch panel 13. Although an input on the touch panel 13is usually made by using the touch pen 28, a finger of a user may beused for making an input on the touch panel 13, in addition to the touchpen 28.

The operation buttons 14A to 14L are each an input device for making apredetermined input. As shown in FIG. 1, among the operation buttons 14Ato 14L, a cross button 14A (a direction input button 14A), a button 14B,a button 14C, a button 14D, a button 14E, a power button 14F, aselection button 14J, a HOME button 14K, and a start button 14L areprovided on the inner side surface (main surface) of the lower housing11. The cross button 14A is cross-shaped, and includes buttons forindicating an upward, a downward, a leftward, or a rightward direction.The button 14A to 14E, the selection button 14J, the HOME button 14K,and the start button 14L are assigned functions, respectively, inaccordance with a program executed by the game apparatus 10, asnecessary. For example, the cross button 14A is used for selectionoperation and the like, and the operation buttons 14B to 14E are usedfor, for example, determination operation and cancellation operation.The power button 14F is used for powering the game apparatus 10 on/off.

The analog stick 15 is a device for indicating a direction. The analogstick 15 has a top, corresponding to a key, which slides parallel to theinner side surface of the lower housing 11. The analog stick 15 acts inaccordance with a program executed by the game apparatus 10. Forexample, when a game in which a predetermined object emerges in athree-dimensional virtual space is executed by the game apparatus 10,the analog stick 15 acts as an input device for moving the predeterminedobject in the three-dimensional virtual space. In this case, thepredetermined object is moved in a direction in which the topcorresponding to the key of the analog stick 15 slides. As the analogstick 15, a component which enables an analog input by being tilted by apredetermined amount, in any direction, such as the upward, thedownward, the rightward, the leftward, or the diagonal direction, may beused.

Further, the microphone hole 18 is provided on the inner side surface ofthe lower housing 11. Under the microphone hole 18, a microphone (seeFIG. 3) is provided as a sound input device described below, and themicrophone detects for a sound from the outside of the game apparatus10.

FIG. 2( a) is a left side view of the game apparatus 10 in the closedstate. FIG. 2( b) is a front view of the game apparatus 10 in the closedstate. FIG. 2( c) is a right side view of the game apparatus 10 in theclosed state. FIG. 2( d) is a rear view of the game apparatus 10 in theclosed state. As shown in FIG. 2( b) and FIG. 2( d), an L button 14G andan R button 14H are provided on the upper side surface of the lowerhousing 11. The L button 14G and the R button 14H act as shutter buttons(imaging instruction buttons) of the imaging section. Further, as shownin FIG. 2( a), a sound volume button 14I is provided on the left sidesurface of the lower housing 11. The sound volume button 14I is used foradjusting a sound volume of a speaker of the game apparatus 10.

As shown in FIG. 2( a), a cover section 11C is provided on the left sidesurface of the lower housing 11 so as to be openable and closable.Inside the cover section 11C, a connector (not shown) is provided forelectrically connecting between the game apparatus 10 and an externaldata storage memory 45. The external data storage memory 45 isdetachably connected to the connector. The external data storage memory45 is used for, for example, recording (storing) data of an image takenby the game apparatus 10.

Further, as shown in FIG. 2( d), an insertion opening 11D through whichan external memory 44 having a game program stored therein is insertedis provided on the upper side surface of the lower housing 11. Aconnector (not shown) for electrically connecting between the gameapparatus 10 and the external memory 44 in a detachable manner isprovided inside the insertion opening 11D. A predetermined game programis executed by connecting the external memory 44 to the game apparatus10.

Further, as shown in FIG. 1 and FIG. 2( c), a first LED 16A fornotifying a user of an ON/OFF state of a power supply of the gameapparatus 10 is provided on the lower side surface of the lower housing11, and a second LED 16B for notifying a user of an establishment stateof a wireless communication of the game apparatus 10 is provided on theright side surface of the lower housing 11. The game apparatus 10 canmake wireless communication with other devices, and the second LED 16Bis lit up when the wireless communication is established. The gameapparatus 10 has a function of connecting to a wireless LAN in a methodbased on, for example, IEEE802.11.b/g standard. A wireless switch 19 forenabling/disabling the function of the wireless communication isprovided on the right side surface of the lower housing 11 (see FIG. 2(c)).

A rechargeable battery (not shown) acting as a power supply for the gameapparatus 10 is accommodated in the lower housing 11, and the batterycan be charged through a terminal provided on a side surface (forexample, the upper side surface) of the lower housing 11.

(Description of Upper Housing)

Next, a structure of the upper housing 21 will be described. As shown inFIG. 1 and FIG. 2, in the upper housing 21, an upper LCD (Liquid CrystalDisplay) 22, an outer imaging section 23 (an outer imaging section(left) 23 a and an outer imaging section (right) 23 b ), an innerimaging section 24, a 3D adjustment switch 25, and a 3D indicator 26 areprovided. Hereinafter, theses components will be described in detail.

As shown in FIG. 1, the upper LCD 22 is accommodated in the upperhousing 21. The number of pixels of the upper LCD 22 may be, forexample, 800 dots×240 dots (the horizontal line×the vertical line).Although, in the present embodiment, the upper LCD 22 is an LCD, adisplay device using an EL (Electro Luminescence), or the like may beused. In addition, a display device having any resolution may be used asthe upper LCD 22.

The upper LCD 22 is a display device capable of displaying astereoscopically visible image. Further, in the present embodiment, animage for a left eye and an image for a right eye are displayed by usingsubstantially the same display area. Specifically, the upper LCD 22 maybe a display device using a method in which the image for a left eye andthe image for a right eye are alternately displayed in the horizontaldirection in predetermined units (for example, every other line).Alternatively, a display device using a method in which the image for aleft eye and the image for a right eye are alternately displayed for apredetermined time period may be used. Further, in the presentembodiment, the upper LCD 22 is a display device capable of displayingan image which is stereoscopically visible with naked eyes. A lenticularlens type display device or a parallax barrier type display device isused which enables the image for a left eye and the image for a righteye, which are alternately displayed in the horizontal direction, to beseparately viewed by the left eye and the right eye, respectively. Inthe present embodiment, the upper LCD 22 of a parallax barrier type isused. The upper LCD 22 displays, by using the image for a right eye andthe image for a left eye, an image (a stereoscopic image) which isstereoscopically visible with naked eyes. That is, the upper LCD 22allows a user to view the image for a left eye with her/his left eye,and the image for a right eye with her/his right eye by utilizing aparallax barrier, so that a stereoscopic image (a stereoscopicallyvisible image) exerting a stereoscopic effect for a user can bedisplayed. Further, the upper LCD 22 may disable the parallax barrier.When the parallax barrier is disabled, an image can be displayed in aplanar manner (it is possible to display a planar visible image which isdifferent from a stereoscopically visible image as described above.Specifically, a display mode is used in which the same displayed imageis viewed with a left eye and a right eye.). Thus, the upper LCD 22 is adisplay device capable of switching between a stereoscopic display modefor displaying a stereoscopically visible image and a planar displaymode (for displaying a planar visible image) for displaying an image ina planar manner. The switching of the display mode is performed by the3D adjustment switch 25 described below.

Two imaging sections (23 a and 23 b ) provided on the outer side surface(the back surface reverse of the main surface on which the upper LCD 22is provided) 21D of the upper housing 21 are generically referred to asthe outer imaging section 23. The imaging directions of the outerimaging section (left) 23 a and the outer imaging section (right) 23 bare each the same as the outward normal direction of the outer sidesurface 21D. The outer imaging section (left) 23 a and the outer imagingsection (right) 23 b can be used as a stereo camera depending on aprogram executed by the game apparatus 10. Each of the outer imagingsection (left) 23 a and the outer imaging section (right) 23 b includesan imaging device, such as a CCD image sensor or a CMOS image sensor,having a common predetermined resolution, and a lens. The lens may havea zooming mechanism.

The inner imaging section 24 is positioned on the inner side surface(main surface) 21B of the upper housing 21, and acts as an imagingsection which has an imaging direction which is the same direction asthe inward normal direction of the inner side surface. The inner imagingsection 24 includes an imaging device, such as a CCD image sensor and aCMOS image sensor, having a predetermined resolution, and a lens. Thelens may have a zooming mechanism.

The 3D adjustment switch 25 is a slide switch, and is used for switchinga display mode of the upper LCD 22 as described above. Further, the 3Dadjustment switch 25 is used for adjusting the stereoscopic effect of astereoscopically visible image (stereoscopic image) which is displayedon the upper LCD 22. A slider 25 a of the 3D adjustment switch 25 isslidable to any position in a predetermined direction (along thelongitudinal direction of the right side surface), and a display mode ofthe upper LCD 22 is determined in accordance with the position of theslider 25 a. Further, a manner in which the stereoscopic image isvisible is adjusted in accordance with the position of the slider 25 a.Specifically, an amount of deviation in the horizontal direction betweena position of an image for a right eye and a position of an image for aleft eye is adjusted in accordance with the position of the slider 25 a.

The 3D indicator 26 indicates whether or not the upper LCD 22 is in thestereoscopic display mode. The 3D indicator 26 is implemented as an LED,and is lit up when the stereoscopic display mode of the upper LCD 22 isenabled. The 3D indicator 26 may be lit up only when the upper LCD 22 isin the stereoscopic display mode, and program processing for displayinga stereoscopically visible image is performed.

Further, a speaker hole 21E is provided on the inner side surface of theupper housing 21. A sound from a speaker 43 described below is outputtedthrough the speaker hole 21E.

(Internal Configuration of Game Apparatus 10)

Next, an internal electrical configuration of the game apparatus 10 willbe described with reference to FIG. 3. FIG. 3 is a block diagramillustrating an internal configuration of the game apparatus 10. Asshown in FIG. 3, the game apparatus 10 includes, in addition to thecomponents described above, electronic components such as an informationprocessing section 31, a main memory 32, an external memory interface(external memory I/F) 33, an external data storage memory I/F 34, aninternal data storage memory 35, a wireless communication module 36, alocal communication module 37, a real-time clock (RTC) 38, anacceleration sensor 39, a power supply circuit 40, an interface circuit(I/F circuit) 41, and the like. These electronic components are mountedon an electronic circuit substrate, and accommodated in the lowerhousing 11 (or the upper housing 21).

The information processing section 31 is information processing meanswhich includes a CPU (Central Processing Unit) 311 for executing apredetermined program, a GPU (Graphics Processing Unit) 312 forperforming image processing, and the like. The CPU 311 of theinformation processing section 31 executes a program stored in a memory(for example, the external memory 44 connected to the external memoryI/F 33 or the internal data storage memory 35) inside the game apparatus10 to execute a process according to the program. The program executedby the CPU 311 of the information processing section 31 may be acquiredfrom another device through communication with the other device. Theinformation processing section 31 further includes a VRAM (Video RAM)313. The GPU 312 of the information processing section 31 generates animage in accordance with an instruction from the CPU 311 of theinformation processing section 31, and renders the image in the VRAM313. The GPU 312 of the information processing section 31 outputs theimage rendered in the VRAM 313, to the upper LCD 22 and/or the lower LCD12, and the image is displayed on the upper LCD 22 and/or the lower LCD12.

To the information processing section 31, the main memory 32, theexternal memory I/F 33, the external data storage memory I/F 34, and theinternal data storage memory 35 are connected. The external memory I/F33 is an interface for detachably connecting to the external memory 44.The external data storage memory I/F 34 is an interface for detachablyconnecting to the external data storage memory 45.

The main memory 32 is volatile storage means used as a work area and abuffer area for (the CPU 311 of) the information processing section 31.That is, the main memory 32 temporarily stores various types of dataused for the processing based on the above program, and temporarilystores a program obtained from the outside (the external memory 44,another device, or the like), for example. In the present embodiment,for example, a PSRAM (Pseudo-SRAM) is used as the main memory 32.

The external memory 44 is nonvolatile storage means for storing aprogram executed by the information processing section 31. The externalmemory 44 is implemented as, for example, a read-only semiconductormemory. When the external memory 44 is connected to the external memoryI/F 33, the information processing section 31 can load a program storedin the external memory 44. A predetermined process is performed by theprogram loaded by the information processing section 31 being executed.The external data storage memory 45 is implemented as a non-volatilereadable and writable memory (for example, a NAND flash memory), and isused for storing predetermined data. For example, images taken by theouter imaging section 23 and/or images taken by another device arestored in the external data storage memory 45. When the external datastorage memory 45 is connected to the external data storage memory I/F34, the information processing section 31 loads an image stored in theexternal data storage memory 45, and the image can be displayed on theupper LCD 22 and/or the lower LCD 12.

The internal data storage memory 35 is implemented as a non-volatilereadable and writable memory (for example, a NAND flash memory), and isused for storing predetermined data. For example, data and/or programsdownloaded through the wireless communication module 36 by wirelesscommunication is stored in the internal data storage memory 35.

The wireless communication module 36 has a function of connecting to awireless LAN by using a method based on, for example, IEEE 802.11.b/gstandard. The local communication module 37 has a function of performingwireless communication with the same type of game apparatus in apredetermined communication method (for example, communication using aproprietary protocol, or infrared communication). The wirelesscommunication module 36 and the local communication module 37 areconnected to the information processing section 31. The informationprocessing section 31 can perform data transmission to and datareception from another device via the Internet by using the wirelesscommunication module 36, and can perform data transmission to and datareception from the same type of another game apparatus by using thelocal communication module 37.

The acceleration sensor 39 is connected to the information processingsection 31. The acceleration sensor 39 detects magnitudes ofaccelerations (linear accelerations) in the directions of the straightlines along the three axial (xyz axial) directions, respectively. Theacceleration sensor 39 is provided inside the lower housing 11. In theacceleration sensor 39, as shown in FIG. 1, the long side direction ofthe lower housing 11 is defined as x axial direction, the short sidedirection of the lower housing 11 is defined as y axial direction, andthe direction orthogonal to the inner side surface (main surface) of thelower housing 11 is defined as z axial direction, thereby detectingmagnitudes of the linear accelerations for the respective axes. Theacceleration sensor 39 is, for example, an electrostatic capacitancetype acceleration sensor. However, another type of acceleration sensormay be used. The acceleration sensor 39 may be an acceleration sensorfor detecting a magnitude of an acceleration for one axial direction ortwo-axial directions. The information processing section 31 can receivedata (acceleration data) representing accelerations detected by theacceleration sensor 39, and detect an orientation and a motion of thegame apparatus 10. In addition to (or in place of) the accelerationsensor 39, another sensor such as an angular sensor or an angularvelocity sensor may be connected to the information processing section31, and the sensor may detect an orientation and a motion of the gameapparatus 10.

The RTC 38 and the power supply circuit 40 are connected to theinformation processing section 31. The RTC 38 counts time, and outputsthe time to the information processing section 31. The informationprocessing section 31 calculates a current time (date) based on the timecounted by the RTC 38. The power supply circuit 40 controls power fromthe power supply (the rechargeable battery accommodated in the lowerhousing 11 as described above) of the game apparatus 10, and suppliespower to each component of the game apparatus 10.

LEDs 16 (16A and 16B) are connected to the information processingsection 31. Using the LEDs 16, the information processing section 31notifies a user of an ON/OFF state of a power supply of the gameapparatus 10, or notifies the user of an establishment state of awireless communication of the game apparatus 10.

The I/F circuit 41 is connected to the information processing section31. The microphone 42 and the speaker 43 are connected to the I/Fcircuit 41. Specifically, the speaker 43 is connected to the I/F circuit41 through an amplifier which is not shown. The microphone 42 detects avoice from a user, and outputs a sound signal to the I/F circuit 41. Theamplifier amplifies a sound signal outputted from the I/F circuit 41,and a sound is outputted from the speaker 43. The touch panel 13 isconnected to the I/F circuit 41. The I/F circuit 41 includes a soundcontrol circuit for controlling the microphone 42 and the speaker 43(amplifier), and a touch panel control circuit for controlling the touchpanel. The sound control circuit performs A/D conversion and D/Aconversion on the sound signal, and converts the sound signal to apredetermined form of sound data, for example. The touch panel controlcircuit generates a predetermined form of touch position data based on asignal outputted from the touch panel 13, and outputs the touch positiondata to the information processing section 31. The touch position datarepresents a coordinate of a position, on an input surface of the touchpanel 13, on which an input is made. The touch panel control circuitreads a signal outputted from the touch panel 13, and generates thetouch position data every predetermined time. The information processingsection 31 obtains the touch position data, to recognize a position onwhich an input is made on the touch panel 13.

The operation button 14 includes the operation buttons 14A to 14Ldescribed above, and is connected to the information processing section31. Operation data representing an input state of each of the operationbuttons 14A to 14I is outputted from the operation button 14 to theinformation processing section 31, and the input state indicates whetheror not each of the operation buttons 14A to 14I has been pressed. Theinformation processing section 31 obtains the operation data from theoperation button 14 to perform a process in accordance with the input onthe operation button 14.

The analog stick 15 is connected to the information processing section31. Operation data indicating an analog input (direction of operationand amount of operation) to the analog stick 15 is outputted from theanalog stick 15 to the information processing section 31. Theinformation processing section 31 obtains the operation data from theanalog stick 15 to execute a process according to the input to theanalog stick 15.

The lower LCD 12 and the upper LCD 22 are connected to the informationprocessing section 31. The lower LCD 12 and the upper LCD 22 eachdisplay an image in accordance with an instruction from (the GPU 312 of)the information processing section 31. In the present embodiment, theinformation processing section 31 causes the upper LCD 22 to display astereoscopic image (stereoscopically visible image).

Specifically, the information processing section 31 is connected to anLCD controller (not shown) of the upper LCD 22, and causes the LCDcontroller to set the parallax barrier to ON or OFF. When the parallaxbarrier is set to ON in the upper LCD 22, an image for a right eye andan image for a left eye, which are stored in the VRAM 313 of theinformation processing section 31 are outputted to the upper LCD 22.More specifically, the LCD controller alternately repeats reading ofpixel data of the image for a right eye for one line in the verticaldirection, and reading of pixel data of the image for a left eye for oneline in the vertical direction, thereby reading, from the VRAM 313, theimage for a right eye and the image for a left eye. Thus, an image to bedisplayed is divided into the images for a right eye and the images fora left eye each of which is a rectangle-shaped image having one line ofpixels aligned in the vertical direction, and an image, in which therectangle-shaped image for the left eye which is obtained through thedivision, and the rectangle-shaped image for the right eye which isobtained through the division are alternately aligned, is displayed onthe screen of the upper LCD 22. A user views the images through theparallax barrier in the upper LCD 22, so that the image for the righteye is viewed by the user's right eye, and the image for the left eye isviewed by the user's left eye. Thus, the stereoscopically visible imageis displayed on the screen of the upper LCD 22.

The outer imaging section 23 and the inner imaging section 24 areconnected to the information processing section 31. The outer imagingsection 23 and the inner imaging section 24 each take an image inaccordance with an instruction from the information processing section31, and output data of the taken image to the information processingsection 31.

The 3D adjustment switch 25 is connected to the information processingsection 31. The 3D adjustment switch 25 transmits, to the informationprocessing section 31, an electrical signal in accordance with theposition of the slider 25 a.

The 3D indicator 26 is connected to the information processing section31. The information processing section 31 controls whether or not the 3Dindicator 26 is to be lit up. In the present embodiment, the informationprocessing section 31 lights up the 3D indicator 26 when the upper LCD22 is in the stereoscopic display mode. The game apparatus 10 has theinternal configuration as described above.

(Outline of Characteristic Operations)

Hereinafter, an outline of characteristic operations according to thepresent embodiment will be described with reference to FIGS. 4 to 6.Each of FIGS. 4 to 6 illustrates an example of a virtualthree-dimensional space, and an image (a stereoscopically visible imagevisually recognized by a user) obtained by taking the virtualthree-dimensional space using a virtual stereo camera 106 describedlater. In each of FIGS. 4 to 6 and 11, (2) shows a stereoscopicallyvisible image composed of an image for a left eye and an image for aright eye, in which a parallax is set between these images. Actually,the stereoscopically visible image is stereoscopically viewed by botheyes of a user. However, the stereoscopically visible image isillustrated as a planar image because of limitation on drawingexpression.

In the present embodiment, for example, a shooting game is considered,which is progressed from a so-called third person viewpoint. As shown inFIG. 4(1), a user operates an own plane object 101 (which may bereferred to as a user object) to shoot an enemy plane object 103 a orthe like in the virtual three-dimensional space. In the presentembodiment, the virtual three-dimensional space is taken by the virtualstereo camera 106 (hereinafter simply referred to as a virtual camera106) which is placed behind the own plane object 101 in the virtualthree-dimensional space, thereby generating an image for a left eye andan image for a right eye. These images are displayed as astereoscopically visible image on the upper LCD 22. Hereinafter, theshooting game will be described in detail.

As shown in FIG. 4(1), placed in the virtual three-dimensional spaceare: the own plane object 101 to be operated by the user; a topographyobject 102 such as ground; enemy plane objects 103 a, 103 b, and 103 eas shooting targets; a structure object 104 such as a building; an aimobject 105 indicating a direction of shooting by the own plane object101; and the virtual camera 106 for taking an image of a view in adirection where the own plane object 101 is present, from rear of theown plane object 101.

In the present embodiment, when the virtual camera 106 takes the virtualthree-dimensional space to generate (render) a stereoscopically visibleimage, a Z-buffer algorithm described below is adopted. Since theZ-buffer algorithm is generally known, detailed description thereof willbe omitted. In the Z-buffer algorithm, each of pixels constituting adisplay screen on which a display image is rendered is caused to haveinformation relating to depth (Z value) as well as color information.The Z value is a value representing a depth from the virtual camera. TheZ value is “0.0” at the position of the virtual camera, and graduallyapproaches “1.0” with distance from the virtual camera. When renderingthe display image on the display screen, the already-set Z value iscompared with the Z value of a portion of an object to be rendered, foreach pixel of the display screen. This comparison is referred to as a Ztest. If the latter Z value is smaller than the former Z value, thecolor of the portion of the object to be rendered is given to thecorresponding pixel, and the former Z value is overwritten (updated)with the latter Z value. Thereby, another object (or a portion ofanother object) that is ought to be hidden behind an anterior object (anobject on the virtual camera side) is not rendered.

As shown in FIG. 4(1), the aim object 105 is placed at a position thatis in the imaging direction of the virtual camera 106, and apart fromthe virtual camera 106 by a predetermined distance. The own plane object101 is placed at a position that is within the imaging range of thevirtual camera 106, between the virtual camera 106 and the aim object105, and a little ahead of the virtual camera 106. When the virtualthree-dimensional space taken by the virtual camera 106 is renderedusing the Z-buffer algorithm, the Z value of the aim object 105 isoffset (shifted) by a predetermined amount in a direction in which theaim object 105 approaches the virtual camera 106. For example, if the Zvalue of a certain portion of the aim object 105 is calculated as “0.7”in the rendering process, the Z value of this portion is offset by apredetermined amount (for example, by “0.4”) to set the Z value to“0.3”. As shown in FIG. 4(1), the own plane object 101 is placed at aposition that is between the virtual camera 106 and a position (positionA in FIG. 4(1)) corresponding to the post-offset Z value, and apart fromthe position A by a predetermined distance.

FIG. 4(2) shows a display image (stereoscopically visible image) that isobtained by rendering the virtual three-dimensional space in the stateshown in FIG. 4(1) with the Z values being offset as described aboveusing the Z-buffer algorithm. As shown in FIG. 4(2), the aim object 105is rendered in the virtual three-dimensional space although portionsthereof are hidden by the enemy plane object 103 a and the structureobject 104 (refer to FIG. 4(1)). The reason is as follows. As describedwith reference to FIG. 4(1), the Z values of the respective portions ofthe aim object 105, which are calculated in the rendering process, areoffset to the value corresponding to the position A.

As described above, in the rendering process using the Z-bufferalgorithm according to the present embodiment, the stereoscopicallyvisible image is rendered with the Z values of the respective portionsof the aim object 105 being offset. Thereby, in the stereoscopicallyvisible image shown in FIG. 4(2), the aim object 105 is rendered with asense of depth (parallax) according to the position where the aim object105 is placed in the virtual three-dimensional space. In addition, evenif there are objects (103 a and 104) that are placed between the virtualcamera 106 and the aim object 105 (placed deeper than the position A)and block the aim object 105, the aim object 105 is preferentiallyrendered without being hidden by these objects. As a result, the aimobject 105 can be naturally and stereoscopically displayed with a senseof depth, without losing its function as an aim.

FIG. 5(1) shows the virtual three-dimensional space at a point in timewhen a predetermined period has passed from the state shown in FIG.4(1). As shown in FIG. 5(1), the virtual camera 106, the aim object 105,and the own plane object 101 have moved forward (in a axis positivedirection) from the state of FIG. 4(1) while keeping the above-describedpositional relationship in the virtual three-dimensional space. Thereby,the structure object 104 is placed between the virtual camera 106 andthe own plane object 101. The enemy plane object 103 a is placed betweenthe virtual camera 106 and the position A.

FIG. 5(2) shows a display image (stereoscopically visible image) that isobtained by rendering the virtual three-dimensional space in the stateshown in FIG. 5(1) with the Z values being offset by using the Z bufferalgorithm as described with reference to FIG. 4(1). As shown in FIG.5(2), the aim object 105 is rendered without being hidden by the enemyplane object 103 c that is placed deeper (in the z axis positivedirection) than the position A (refer to FIG. 5(1)). On the other hand,the aim object 105 is partially hidden (blocked) by the enemy planeobject 103 a and the structure object 104 which are placed anterior to(in a z axis negative direction) the position A.

As described above, in the stereoscopically visible image shown in FIG.5(2), the aim object 105 is rendered with a sense of depth (parallax)according to the position where the aim object 105 is placed in thevirtual three-dimensional space. In addition, even if there is an object(103 c) that is placed between the virtual camera 106 and the aim object105 (placed deeper than the position A) and partially blocks the aimobject 105, the aim object 105 is preferentially rendered without beingpartially blocked by this object.

On the other hand, the aim object 105 is partially hidden (blocked) byan object (103 a) that is placed between the own plane object 101 andthe position A. In the shooting game of the present embodiment, if theown plane object 101 shoots and destroys (blows up) an enemy planeobject that is positioned within a predetermined distance from the ownplane object 101, the own plane object 101 is damaged by thedestruction. In the present embodiment, as shown in FIG. 5(1), a spaceis provided between the own plane object 101 and the position A, andthereby the aim object 105 is not displayed (rendered) in preference toan enemy plane object or the like that is positioned so near to the ownplane object 101 that the own plane object 101 is damaged when it shootsand destroys the enemy plane object.

FIG. 6(1) shows the virtual three-dimensional space at a point in timewhen a predetermined period has passed from the state shown in FIG.5(1). As shown in FIG. 6(1), the virtual camera 106, the aim object 105,and the own plane object 101 have moved forward (in the z axis positivedirection) from the state shown in FIG. 5(1) in the virtualthree-dimensional space. Thereby, the structure object 104 is outsidethe imaging range of the virtual camera 106, and a mountain part of thetopography object 102 approaches the own plane object 101.

FIG. 6(2) shows a display image (stereoscopically visible image)obtained by rendering the virtual three-dimensional space in the stateshown in FIG. 6(1) with the Z values being offset by using the Z-bufferalgorithm as described with reference to FIG. 4(1). In the presentembodiment, even if the aim object 105 is hidden (blocked) by thetopography object 102 in the rendering process using the Z-bufferalgorithm, the aim object 105 is constantly rendered. That is, the aimobject 105 is always rendered in preference to the topography object102. Specifically, even in the situation at the position A shown in FIG.6(1) (even when a bottom portion of the aim object 105 is hidden by thetopography object 102), the entirety of the aim object 105 is renderedwithout being hidden by the topography object 102 as shown in FIG. 6(2).In the present embodiment, the above-described rendering is realized asfollows. That is, when performing the rendering process, according tothe Z-buffer algorithm, in such a manner that the Z value of the aimobject 105 and the Z value of the topography object 102 are comparedwith each other (are subjected to Z test) for each pixel of a renderingtarget, if the Z value of the former object is greater than the Z valueof the latter object (that is, if the aim object 105 is farther from thevirtual camera 106 than the topography object 102), the renderingprocess is performed as if the Z value of the former object is smallerthan the Z value of the latter object (that is, as if the aim object 105is nearer to the virtual camera 106 than the topography object 102). Thedetail of this rendering process will be described later with referenceto FIG. 9.

In the present embodiment, as described above, the aim object 105 isalways rendered in preference to the topography object 102. Thereby,even if the mountain approaches the own plane object 101 as shown inFIG. 6(1), the aim object 105 is continuously displayed with a sense ofdepth, without being hidden by the mountain. Therefore, the user isprevented from losing sight of the aim object 105.

As described above, according to the present embodiment, whenstereoscopically displaying the virtual three-dimensional space, theindication object (aim object 105) for indicating a position in thevirtual three-dimensional space can be naturally and stereoscopicallydisplayed with a sense of depth, without losing its function.

(Details of Game Processing)

Hereinafter, game processing to be executed by the game apparatus 10will be described in detail. First, data to be stored in the main memory32 during the game processing will be described. FIG. 7 shows a memorymap of the main memory 32 of the game apparatus 10. As shown in FIG. 7,the main memory 32 includes a program storage area 400 and a datastorage area 500. A part of data in the program storage area 400 and apart of data in the data storage area 500 are stored in, for example,the external memory 44, and are read and stored in the main memory 32when executing the game processing.

The program storage area 400 has, stored therein, programs such as agame processing program 401 for executing a process of a flowchart shownin FIG. 8 and a rendering program 402 for executing a process of aflowchart shown in FIG. 9. These flowcharts will be described later.

The data storage area 500 has, stored therein, operation data 501,virtual camera data 502, aim object data 503, Z value offset data 504,own plane object data 505, group A object data 506, group 13 object data509 and the like.

The operation data 501 represents a user operation performed on therespective operation buttons 14A to 14E and 14G to 14H and the analogstick 15. The operation data 501 represents, for example, a useroperation in which the user causes the own plane object 101 to swivelup, down, and side to side, or a user operation in which the user causesthe own plane object 101 to perform shooting.

The virtual camera data 502 represents the position, imaging direction,and imaging angle of the virtual camera 106 in the virtualthree-dimensional space (refer to FIG. 4 or the like).

The aim object data 503 represents the position, orientation, shape(polygon shape), color (texture) and the like of the aim object 105 inthe virtual three-dimensional space.

The Z value offset data 504 is a predetermined value that is used foroffsetting (shifting), by a predetermined amount, a Z value (Z=0.0 to1.0) indicating a depth of the aim object 105 from the virtual camera106 when rendering the virtual three-dimensional space using theZ-buffer algorithm. In the present embodiment, the Z value offset data504 is “0.4”, for example.

The own plane object data 505 represents the position, orientation,shape (polygon shape), color (texture) and the like of the own planeobject 101 in the virtual three-dimensional space (refer to FIG. 4 orthe like).

The group A object data 506 includes data of objects that belong togroup A, such as topography object data 507 and cloud object data 508.The aim object 105 is always rendered in preference to the objects thatbelong to the group A, which will be described later in detail withreference to FIG. 9.

The topography object data 507 represents the position, orientation,shape (polygon shape), color (texture) and the like of the topographyobject 102 (refer to FIG. 4 or the like).

The cloud object data 508 represents the position, orientation, shape(polygon shape), color (texture) and the like of a cloud object (notshown) which is one of objects representing the background.

The group B object data 509 includes data of objects that belong togroup B, such as enemy plane object data 510, structure object data 511,and bullet object data 512. Depending on the positions (depths) of theobjects that belong to the group B, the aim object 105 is rendered inpreference to the objects that belong to the group B, which will bedescribed later in detail with reference to FIG. 9.

The enemy plane object data 510 represents the positions, orientations,shapes (polygon shapes), colors (textures) and the like of the enemyplane objects 103 a to 103 c (refer to FIG. 4 or the like).

The structure object data 511 represents the position, orientation,shape (polygon shape), color (texture) and the like of the structureobject 104 (refer to FIG. 4 or the like).

The bullet object data 512 represents the positions, orientations,shapes (polygon shapes), colors (textures) and the like of balletobjects (not shown) that are discharged from the own plane object 101and the enemy plane objects 103 a to 103 c.

Next, a flow of the game processing to be executed by the game apparatus10 will be described with reference to FIG. 8. When the game apparatus10 is powered on, the CPU 311 of the game apparatus 10 executes astartup program stored in the internal data storage memory 35, andthereby the respective units such as the main memory 32 are initialized.Then, the game processing program 401 and the like, which are stored inthe external memory 44, are loaded into the main memory 32, and the gameprocessing program 401 is executed by the CPU 311.

FIG. 8 is an example of a flowchart of the game processing to beexecuted by the CPU 311. The processing shown in the flowchart of FIG. 8is repeatedly executed for each frame (one frame corresponds to 1/60second, for example). In the following description, processes that donot directly relate to the present invention will not be described.

First, in step S1, the CPU 311 executes the game processing.Specifically, the CPU 311 places the virtual camera 106, the aim object105, the own plane object 101, the enemy plane objects 103 a to 103 c,the structure object 104, the topography object 102 and the like, in thevirtual three-dimensional space, based on the virtual camera data 502,the aim object data 503, the own plane object data 505, the group Aobject data 506, and the group B object data 509. As already describedwith reference to FIGS. 4 to 6, the aim object 105 is placed at aposition that is a predetermined distance apart from the virtual camera106 in the imaging direction of the virtual camera 106. The own planeobject 101 is placed at a position that is between the virtual camera106 and the position A and is a predetermined distance apart from theposition A. The own plane object 101 is placed such that its forwarddirection aligns with the imaging direction of the virtual camera 106.Then, the CPU 311 causes the virtual camera 106, the aim object 105, andthe own plane object 101 in the virtual three-dimensional space toautomatically (forcibly) move in the forward direction (in the z axispositive direction shown in FIG. 4(1) or the like) at a predeterminedspeed.

Then, the CPU 311 reflects an operation performed by the user, to theprogress in the game, based on the operation data 501. For example, ifthe user performs an operation to change the moving direction of the ownplane object 101 (i.e., an operation to swivel the own plane object101), the CPU 311 causes the own plane object 101 to swivel inaccordance with the operation. At this time, the CPU 311 maintains thepositional relationship between these objects (refer to FIG. 4(1) or thelike). Thereby, the position of the aim object 105 is moved incoordination with the change in the moving direction of the own planeobject 101. For example, if the user performs an operation to cause theown plane object 101 to perform shooting, the CPU 311 causes the ownplane object 101 to discharge a bullet object, and causes the dischargedbullet object to move toward the aim object 105. If the bullet objecthits an enemy plane object (103 a or the like), the CPU 311 destroys theenemy plane object. If the enemy plane object is destroyed (blown up) ata position nearer to the own plan object 101 than the position A, theCPU 311 causes damage due to this blowup to the own plan object 101. Ifa bullet object discharged from the enemy plane object hits the ownplane object 101, the CPU 311 causes damage to the own plane object 101.If the own plane object 101 crashes into the enemy plane object (103 aor the like), or the structure object 104, or the topography object 102,the CPU 311 causes damage to the own plane object 101. After theabove-described step S1, the process goes to step S2.

In step S2, the GPU 312 performs a process of rendering the virtualthree-dimensional space in which the game progresses according to stepS1. Thereafter, the process goes to step S3. The rendering process instep S2 will be described later with reference to FIG. 9.

In step S3, the CPU 311 determines whether the game has ended.Specifically, the CPU 311 determines whether the game progressing in thevirtual three-dimensional space is in a predetermined end state, anddetermines, based on the operation data 501, whether the user hasperformed an operation to end the game. When the game is in thepredetermined end state or when the user has performed an operation toend the game (YES in step S3), the CPU 311 ends the game. On the otherhand, when the determination in step S3 is NO, the CPU 311 returns theprocess to step S1.

FIG. 9 is an example of a flowchart illustrating the rendering processin step S2 of FIG. 8. In the following description, the GPU 312 executesthe entirety of the rendering process shown in FIG. 9. However, a partof the rendering process may be executed by the CPU 311. When eachobject is rendered in the VRAM 313 by the rendering process using theZ-buffer algorithm, depth comparison (Z test) is performed pixel bypixel, and rendering is performed pixel by pixel. Further, since thevirtual camera 106 is a stereo camera, an image for a left eye and animage of a right eye are respectively rendered in the VRAM 313 in thefollowing rendering process. However, rendering of the both images willbe integrally described in order to simplify the description.

First, in step S21, the GPU 312 calculates a Z value (depth) of each ofportions of the aim object 105, and offsets (shifts) the calculated Zvalue by a predetermined amount. Specifically, the GPU 312 offsets, withreference to the Z value offset data 504, the Z value of each portion ofthe aim object 105 by “0.4” in a direction in which the aim object 105approaches the virtual camera 106 (refer to position A in FIG. 4(1) orthe like). Thereafter, the process goes to step S22. The offset processin step S21 is performed so as to adjust an anteroposterior relationshipbetween the aim object 105 and the group B objects and the like. Whenthe anteroposterior relationship need not be adjusted, the Z value maynot be offset or the Z value may be set to 0.

In step S22, the GPU 312 renders the group A objects (topography object102 and the like) in the VRAM 313. Thereafter, the process goes to stepS23.

In step S23, the GPU 312 determines whether at least a portion of theaim object 105 is hidden by any of the group A objects when the aimobject 105 is rendered, by performing a Z test using the Z values thatwere offset in step S21 (hereinafter, referred to as “post-offset Zvalues”). Specifically, the GPU 312 compares, for each of the pixels inthe Z buffer, the Z values of the group A objects rendered in step S22with the post-offset Z values of the aim object 105. When there arepixels in which the latter Z values are greater than the former Zvalues, the GPU 312 determines that at least a portion of the aim object105 is hidden by any of the group A objects. When the determination instep S23 is YES, the process goes to step S24. When the determination instep S23 is NO, the process goes to step S25.

In step S24, the GPU 312 performs a Z test using the post-offset Zvalues, on the portion of the aim object 105 which is determined in stepS23 as being hidden by the group A object, in such a manner that themagnitudes of the Z values are inverted. Then, the GPU 312 renders theportion of the aim object 105 in the VRAM 313. For example, in a casewhere “0.28” is set as a Z value of a pixel in the Z buffer, which pixelcorresponds to a certain pixel in the display screen in which the groupA objects are rendered, and where a post-offset Z value corresponding tothis pixel in the Z buffer is “0.30”, the GPU 312 determines, in the Ztest, that the latter Z value (i.e., “0.30”) is smaller than the formerZ value. That is, the GPU 312 performs determination with the magnitudesof the Z values being inverted. Then, the GPU 312 renders, in the pixelin the display screen, the color of the portion of the aim object 105,which portion corresponds to the pixel in the display screen, andupdates the Z value of the pixel in the Z buffer by the post-offset Zvalue “0.30”. When the GPU 312 renders the portion of the aim object 105in step S24, the GPU 312 sets a parallax between the image for a lefteye and the image for a right eye, based on the Z values before theoffsetting in step S21 (hereinafter referred to as “pre-offset Zvalues”). Thereafter, the process goes to step S25. It should be notedthat, the same effect can be achieved by, without using the method ofinverting the magnitudes of the Z values as described above, renderingthe color of a portion of the aim object 105 in a pixel when apost-offset Z value is greater than a Z value of the corresponding pixelin the Z buffer.

In step S25, the GPU 312 performs an ordinary Z test using thepost-offset Z values (i.e., a Z test in which the magnitudes of the Zvalues are not inverted), on a portion (an unhidden portion) of the aimobject 105, which is determined in step S23 as not being hidden by thegroup A objects. Then, the GPU 312 renders the unhidden portion of theaim object 105 in the VRAM 313. When the GPU 312 renders the unhiddenportion of the aim object 105 in step S25, the GPU 312 sets, as in stepS24, a parallax between the image for a left eye and the image for aright eye, based on the pre-offset Z values. Thereafter, the processgoes to step S26.

In the processes in steps S23 to S25, the hidden part and the unhiddenpart of the aim object 105 are processed separately; however, in anotherembodiment, by performing, for all the portions of the aim object 105,both of the rendering process using the ordinary Z test and therendering process using the Z test in which the magnitudes of the Zvalues are inverted, whether each of the portions is hidden or unhiddenneed not be determined because if a part of the aim object 105 is notrendered when the ordinary Z test is performed, the part of the aimobject 105 is rendered when the Z test in which the magnitudes of the Zvalues are inverted is performed. In this case, instead of performingthe two processes, two aim objects 105 having the same shape may beprovided at the same position so that the ordinary Z test is performedfor one of the two aim objects 105 and the Z test in which themagnitudes of the Z values are inverted is performed for the other ofthe two aim objects 105. Further, in this case, by displaying the aimobject 105 for which the Z test in which the magnitudes of the Z valuesare inverted is performed so as to be translucent, a user feels lessuncomfortable when the aim object 105 which is placed at a positiondeeper than a position of the other object is superimposed on the otherobject. That is, the aim object 105 is rendered in preference to theobject in front of the aim object 105 and by rendering the portion ofthe aim object 105 that is overlapped by the object in front of the aimobject 105 so as to be translucent, the aim object 105 can be displayedat a deeper position due to a parallax and constantly displayed in anatural manner. When the aim object 105 is rendered translucent, the aimobject 105 is preferentially rendered after the other object which is infront of the aim object 105 is rendered. In order to constantly displaythe aim object 105, for example, the aim object 105 is preferentiallyrendered after the other object, the group B objects and the own planeobject 101 are rendered. Alternatively, when it is determined whether atleast a portion of the aim object 105 is hidden, if it is determinedthat at least a portion of the aim object 105 is hidden, the entirety ofthe aim object 105 may be rendered translucent. Furthermore, other thanrendering the aim object 105 translucent, the color of the aim object105 may be changed to a lighter color, the texture of the aim object 105may be changed, or the like so that the aim object 105 may be viewed ina natural manner.

In step S26, the GPU 312 performs an ordinary Z test (a Z test in whichthe magnitudes of the Z values are not inverted) on the group B objects(such as the enemy plane objects 103 a to 103 c and the structure object104), and renders the group B objects in the VRAM 313. Thereafter, theprocess goes to step S27.

In step S27, the GPU 312 performs an ordinary Z test (a Z test in whichthe magnitudes of the Z values are not inverted) on the own plane object101, and renders the own plane object 101 in the VRAM 313. Thereafter,the process goes to step S28.

In step S28, the GPU 312 outputs, to the upper LCD 22, an image (astereoscopically visible image composed of an image for a left eye andan image for a right eye) that is rendered in the VRAM 313 through theprocesses in steps S21 to S27. As a result, the stereoscopically visibleimage of the virtual three-dimensional space, which is taken by thevirtual camera 106, is displayed on the upper LCD 22. Thereafter, theprocess goes to step S3 in FIG. 8.

As described above, in the rendering process using the Z-bufferalgorithm according to the present embodiment, the Z values of the aimobject 105 are offset, and a stereoscopically visible image is renderedin accordance with the preference order of object rendering based on thepost-offset Z values. Further, in the rendering process, when renderingthe aim object 105, a parallax between an image for a left eye and animage for a right eye is set based on the pre-offset Z values. Thereby,in the stereoscopically visible image (refer to FIG. 4(2) and the like),the aim object 105 can be rendered with a sense of depth (parallax)according to the position where the aim object 105 is placed in thevirtual three-dimensional space. In addition, even if there is a group Aobject that is placed at a position between the virtual camera 106 andthe aim object 105 (placed deeper than the position A) and blocks theaim object 105, the aim object 105 can be rendered without being hiddenby the group A object.

Further, in the present embodiment, a portion of the aim object 105 ishidden by a group A object that is placed between the own plane object101 and the position A and blocks the aim object 105 (refer to FIG. 5).Therefore, the user can identify an enemy plane object that causesdamage to the own plane object 101 when it is shot and blown up.

Further, in the present embodiment, the aim object 105 is alwaysrendered in preference to the topography object 102. Therefore, evenwhen the mountain approaches the own plane object 101 as shown in FIG.6(1), the aim object 105 is not hidden behind the mountain but iscontinuously rendered with a sense of depth. As a result, the user isprevented from losing sight of the aim object 105 even in a case wherethe user causes the own plane object 101 to thread through themountains.

As described above, according to the present embodiment, when a virtualthree-dimensional space is stereoscopically displayed, an indicationobject (aim object 105) that indicates a position in the virtualthree-dimensional space can be naturally and stereoscopically displayedwith a sense of depth, without losing its function.

In the present embodiment described above, the rendering process isperformed as follows. That is, after the Z values of the aim object 105are offset, it is determined whether at least a portion of the aimobject 105 is hidden by any of the group A objects, and a hidden portionof the aim object 105, if any, is subjected to a Z test in which themagnitudes of the Z values are inverted, and then rendered (refer tosteps S21, S23 to S25 in FIG. 9). However, as shown in FIG. 11(1),whether at least a portion of the aim object 105 is hidden by any otherobject may be determined without offsetting the Z values of the aimobject 105, and a hidden portion of the aim object 105, if any, may besubjected to a Z test in which the magnitudes of the Z values areinverted, and then rendered. In this case, as shown in FIG. 11(2), theaim object 105 can be always displayed (rendered) in preference with asense of depth. Alternatively, without determining whether at least aportion of the aim object 105 is hidden by any other object, two aimobjects 105 having the same shape may be provided at the same positionso that one of the two aim objects 105 is rendered by using the ordinaryZ test and the other of the two aim objects 105 is rendered by using theZ test in which the magnitudes of the Z values are inverted. Further, inthis case, by displaying the aim object 105 for which the Z test inwhich the magnitudes of the Z values are inverted is performed so as tobe translucent, as shown in FIG. 11(2), a portion of the object which isviewed at a deeper position in a stereoscopically visible image isrendered in front so as to be translucent and blended with thesurroundings, thereby allowing the user to feel less uncomfortable. Thatis, the aim object 105 is rendered in preference to an object in frontof the aim object 105 and by rendering the portion of the aim object 105being overlapped by the object in front of the aim object 105 so as tobe translucent, the aim object 105 can be displayed at a deeper positionand always displayed in a natural manner. When the aim object 105 isrendered translucent, the aim object 105 is preferably rendered afterthe other object which is in front of the aim object 105 is rendered.Furthermore, other than rendering the aim object 105 so as to betranslucent, the color of the aim object 105 may be changed to a lightercolor, the texture of the aim object 105 may be changed, or the like.

In the embodiment and modification described above, the aim object 105is adopted as an example of an object whose Z values or the like areoffset in the rendering process using the Z-buffer algorithm. However,the object whose Z values or the like are offset in the renderingprocess using the Z-buffer algorithm may be an object (indicationobject) for indicating a position in the virtual three-dimensionalspace. Moreover, the object whose Z values or the like are offset in therendering process using the Z-buffer algorithm may be any object as longas it is an object (preferential display object) to be displayed(rendered) in preference to other objects in the virtualthree-dimensional space. For example, it may be an object representing aspecific character.

In the present embodiment, the present invention is applied to the gameapparatus 10. However, the present invention is applicable not only tothe game apparatus 10 but also to, for example, a portable informationterminal apparatus such as a mobile phone, a personal handyphone system(PHS), or a personal digital assistant (PDA). The present invention isalso applicable to a stationary game apparatus, a personal computer, orthe like.

In the present embodiment, the above-described process is executed bythe single game apparatus 10. However, a plurality of apparatuses whichare communicable with each other in a wired or wireless manner may sharethe above-described process.

In addition, in the present embodiment, the shape of the game apparatus10 is only an example. Further, the shapes of the various operationbuttons 14 and the touch panel 13 which are provided on the gameapparatus 1, the number of each of the operation buttons 14, and thetouch panel 13, and the positions at which each of the operation buttons14 and the touch panel 13 is mounted are examples only. Needless to say,other shapes, number, and mounting positions may be used in the presentinvention. Further, the order of the process steps, the setting values,values used for determination, and the like, which are used in theinformation processing described above, are only examples. Needless tosay, the present invention can be realized using the other order ofprocess steps and other values without departing from the scope of theinvention.

The various information processing programs to be executed in the gameapparatus 10 of the present embodiment may be supplied to the gameapparatus 10 not only via a storage medium such as the external memory44 but also via a wired or wireless communication line. Further, theprograms may be previously stored in a non-volatile storage device (suchas the internal data storage memory 35) provided in the game apparatus10. Examples of the information storage medium having the programsstored therein include a CD-ROM, a DVD, any other optical disc-shapedstorage medium similar to those, a flexible disk, a hard disk, amagnetic optical disk, a magnetic tape, and the like, in addition to anon-volatile memory. Further, the information storage medium having theprograms stored therein may be a volatile memory that temporarily storesthe programs.

While the invention has been described in detail, the foregoingdescription is in all aspects illustrative and not restrictive. It willbe understood that numerous other modifications and variations can bedevised without departing from the scope of the invention.

1. A computer-readable storage medium having stored therein aninformation processing program to be executed by a computer of aninformation processing apparatus which displays a stereoscopicallyvisible image of a virtual three-dimensional space taken by a virtualstereo camera, on a display apparatus capable of displaying astereoscopically visible image, the information processing programcausing the computer to function as: preferential display object placingmeans for placing a preferential display object in an imaging range ofthe virtual stereo camera in the virtual three-dimensional space;stereoscopically visible image rendering means for taking the virtualthree-dimensional space using the virtual stereo camera, and rendering astereoscopically visible image of the virtual three-dimensional space;and display control means for causing the display apparatus to displaythe stereoscopically visible image rendered by the stereoscopicallyvisible image rendering means; wherein the stereoscopically visibleimage rendering means renders the preferential display object inpreference to a predetermined object that is positioned in front of thepreferential display object, such that a portion of the preferentialdisplay object being overlapped by the predetermined object istranslucent.
 2. The computer-readable storage medium having storedtherein the information processing program according to claim 1, whereinthe stereoscopically visible image rendering means renders thepreferential display object according to a preference order by which thepredetermined object is preferentially rendered and renders thepreferential display object according to a preference order by which thepreferential display object is preferentially rendered, therebyrendering the portion of the preferential display object beingoverlapped by the predetermined object translucent.
 3. Thecomputer-readable storage medium having stored therein the informationprocessing program according to claim 2, wherein the preferentialdisplay object includes a first object and a second object which istranslucent, and the stereoscopically visible image rendering meansrenders the first object according to the preference order by which thepredetermined object is preferentially rendered and renders the secondobject according to the preference order by which the preferentialdisplay object is preferentially rendered.
 4. The computer-readablestorage medium having stored therein the information processing programaccording to claim 1, wherein the information processing program furthercauses the computer to function as input receiving means for receivingan input from a user, and the preferential display object placing meanscauses the preferential display object placed in the virtualthree-dimensional space to move based on the input received by the inputreceiving means.
 5. The information processing program according toclaim 1, the program further causes the computer to function as userobject placing means for moving a user object.
 6. The computer-readablestorage medium having stored therein the information processing programaccording to claim 1, wherein the preferential display object is anindication object for indicating a position in the virtualthree-dimensional space.
 7. An information processing apparatus fordisplaying a virtual three-dimensional space taken by a virtual stereocamera, on a display apparatus capable of stereoscopic display, theinformation processing apparatus comprising: preferential display objectplacing means for placing a preferential display object in an imagingrange of the virtual stereo camera in the virtual three-dimensionalspace; stereoscopically visible image rendering means for taking thevirtual three-dimensional space using the virtual stereo camera, andrendering a stereoscopically visible image of the virtualthree-dimensional space; and display control means for causing thedisplay apparatus to display the stereoscopically visible image renderedby the stereoscopically visible image rendering means; wherein thestereoscopically visible image rendering means renders the preferentialdisplay object in preference to a predetermined object that ispositioned in front of the preferential display object, such that aportion of the preferential display object being overlapped by thepredetermined object is translucent.
 8. An information processing systemfor displaying a virtual three-dimensional space taken by a virtualstereo camera, on a display apparatus capable of stereoscopic display,the information processing system comprising: preferential displayobject placing means for placing a preferential display object in animaging range of the virtual stereo camera in the virtualthree-dimensional space; stereoscopically visible image rendering meansfor taking the virtual three-dimensional space using the virtual stereocamera, and rendering a stereoscopically visible image of the virtualthree-dimensional space; and display control means for causing thedisplay apparatus to display the stereoscopically visible image renderedby the stereoscopically visible image rendering means; wherein thestereoscopically visible image rendering means renders the preferentialdisplay object in preference to a predetermined object that ispositioned in front of the preferential display object, such that aportion of the preferential display object being overlapped by thepredetermined object is translucent.
 9. An information processing methodfor displaying a virtual three-dimensional space taken by a virtualstereo camera, on a display apparatus capable of stereoscopic display,the information processing method comprising: a preferential displayobject placing step of placing a preferential display object in animaging range of the virtual stereo camera in the virtualthree-dimensional space; a stereoscopically visible image rendering stepof taking the virtual three-dimensional space using the virtual stereocamera, and rendering a stereoscopically visible image of the virtualthree-dimensional space; and a display control step of displaying, onthe display apparatus, the stereoscopically visible image rendered inthe stereoscopically visible image rendering step; wherein in thestereoscopically visible image rendering step, the preferential displayobject is rendered in preference to a predetermined object that ispositioned in front of the preferential display object, such that aportion of the preferential display object being overlapped by thepredetermined object is translucent.